.\"   $Id: addphref.3,v 1.1 2002/03/08 13:51:01 fred Exp $
.\" @(#)addphref.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot
.if t \{\
.so man1/alc_contents.mac
.XS \n%
.ti 0.2i
addphref
.XE
.XS0 \n%
.ti 0.2i
addphref
.XE0 \}
.TH ADDPHREF 3 "October 1, 1997" "ASIM/LIP6" "MBK PHYSICAL FUNCTIONS"
.SH NAME
addphref \- create a physical reference
.so man1/alc_origin.1
.SH SYNOPSIS
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mph.h"
phref_list \(**addphref(ptfig, type, name, x, y)
phfig_list \(**ptfig;
char \(**type;
char \(**name;
long x, y;
.ft R
.fi
.SH PARAMETERS
.TP 20
\fIptfig\fP
Pointer to the figure in which the reference should be added
.TP
\fItype\fP
Reference type
.TP
\fIname\fP
Reference name
.TP
\fIx, y\fP
Coordinates of the center of the reference.
.SH DESCRIPTION
\fBaddphref\fP creates a new reference whose center is at the given coordinates,
and adds it to the
list of references pointed to by \fIptfig\->PHREF\fP. The new reference is 
added in front of the list, and becomes itself the list head.
.br
The parameters \fItype\fP, \fIname\fP, \fIx\fP and \fIy\fP fill respectivly
the \fIFIGNAME\fP, \fINAME\fP, \fIXREF\fP and \fIYREF\fP fields of the
\fIphref\fP structure.
.br
The \fItype\fPs may have any value, but only two type
are now recognized by tools based upon mbk :
.TP 20
\fB"ref_con"\fP
for multi-access connectors
.TP
\fB"ref_ref"\fP
for cell programming
.LP
For details on the structure, see \fBphref\fR(3).
.SH RETURN VALUE
\fBaddphref\fP returns a pointer to the newly created reference.
.SH EXAMPLE
.ta 3n 6n 9n 12n 15n 18n 21n
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mph.h"
phref_list \(**ref_dup(pfd, pfs) /\(** duplicate refs \(**/
phfig_list \(**pfd, \(**pfs;
{
phref_list \(**pr;
	for (pr = pfs\->phref; pr != NULL; pr = pr\->NEXT)
		addphref(pfd, pr\->FIGNAME, pr\->NAME, pr\->XREF, pr\->YREF);
	return pfd\->PHREF;
}
.ft R
.fi
.SH SEE ALSO
.BR mbk (1),
.BR phfig (3),
.BR phref (3),
.BR getphref (3),
.BR delphref (3).


.so man1/alc_bug_report.1

